﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Payton.WP7.Infrastructure.Cache
{
    public class CacheFactory
    {
        CacheFactory()
        {

        }

        static CacheFactory _cacheFactory;
        public static CacheFactory Instance
        {
            get
            {
                if (_cacheFactory == null)
                    _cacheFactory = new CacheFactory();
                return _cacheFactory;
            }
        }

        public ICache GetCache(string cacheName)
        {
            switch (cacheName)
            {
                case CacheNames.AvtarCache:
                    return new AvtarCache();
            }
            return new Cache(CacheLoadType.ImmediatelyAsync);
        }
    }
}
